package com.javalong.affairs.adapter;

import java.util.List;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

public abstract class BaseAdapter extends android.widget.BaseAdapter{
	protected Context mContext;
	protected LayoutInflater mInflater;
	protected List<?> dataList;
	public BaseAdapter(Context context ,List<?> dataList) {
		mContext = context;
		mInflater = LayoutInflater.from(context);
		this.dataList= dataList;
	}
	@Override
	public int getCount() {
		return dataList.size();
	}

	@Override
	public Object getItem(int position) {
		return dataList.get(position);
	}

	@Override
	public long getItemId(int position) {
		return position;
	}

	public abstract View getView(int position, View convertView, ViewGroup parent);
}
